package edu.tsp.ga;


import java.util.ArrayList;
import java.util.List;

public class Population {

    private int populationSize = 10;

    private List<Chromosome> chromosomes;

    public Population() {
        chromosomes = new ArrayList<>();
    }

    public Population(List<Chromosome> chromosomes) {
        this.chromosomes = chromosomes;
        this.populationSize = chromosomes.size();
    }

    public void addChromosome(Chromosome chromosome) {
        this.chromosomes.add(chromosome);
        this.populationSize++;
    }

    public List<Chromosome> getChromosomes() {
        return chromosomes;
    }

    public int getPopulationSize() {
        return populationSize;
    }
}